/**
 * Created by Goodluck on 2017/3/20.
 */
/**
 * 初始化标题
 * @param length
 * @constructor
 */
function InitTitle(length) {
    $(".title_h1").css({
        fontSize: length * 0.15,
    })
    $(".title_a").css({
        fontSize: length * 0.05,
    })
    $("#newgamebutton").css({
        width: length * 0.2
    })
    $(".title_p").css({
        fontSize: length * 0.07,
        margin: "20px auto"
    })
}

/**
 * 初始化容器
 * @param length
 * @constructor
 */
function InitPanel(length) {
    $(".container").css({
        margin: "40px auto",
        width: length,
        height: length,
        padding: 0,
        "border-radius": length * 0.03,
        "background-color": "#bbada0",
        color: "red",
        fontSize: "40px",
    });
}

function InitCell(length) {
    var number = length / (8 * COUNT + 1);
    cellSideLength = 7 * number;
    cellSpace = cellSideLength / 7;
    for (var i = 0; i < COUNT; i++) {
        for (var j = 0; j < COUNT; j++) {
            var cell = $('<div class="number-cell-basic"></div>');
            cell.css('width', cellSideLength);
            cell.css('height', cellSideLength);
            cell.css('top', getPosTop(i, j, cellSpace, cellSideLength));
            cell.css('left', getPosLeft(i, j, cellSpace, cellSideLength));
            cell.css('background-color', "#ccc0b3");
            cell.css('border-radius', 0.08 * cellSideLength);
            $(".container").append(cell);
        }
    }
}